<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7 charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户中心 - 个人资料</title>
<meta name="description"
	content="久零网一个O2O购物平台。平台以刚性需求为主，结合当地衣食住行玩乐购的大型联盟商家，用买一赠一的方式进行，消费者在久零网及地面店购物购买多少即送等值的代金券，代金券在联盟商家可以一比一等同人民币使用。" />
<meta name="keywords" content="久零网，宁夏O2O，宁夏久零网" />

<meta name="author" content="www.999000.cn" />
<link href="<%=basePath%>/mallstyle/css/global.css" rel="stylesheet"
	type="text/css" />
<link href="<%=basePath%>/mallstyle/css/user.css" rel="stylesheet"
	type="text/css" />
<link href="<%=basePath%>/mallstyle/css/footer.css" rel="stylesheet"
	type="text/css" />
<link type="text/css" href="<%=basePath%>/mallstyle/css/qq.css"
	rel="stylesheet" />

<script type="text/javascript">
			//<!CDATA[
			var SITE_URL = "http://www.999000.cn";
			var REAL_SITE_URL = "http://www.999000.cn";
			var PRICE_FORMAT = '¥%s';
			var serviceinfo = Array;
			//]]>
		</script>
<script type="text/javascript" src="index.php?act=jslang"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/jquery.js" charset="utf-8"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/common.js" charset="utf-8"></script>
<script type="text/javascript"
	src="<%=basePath%>/mallstyle/js/member.js" charset="utf-8"></script>
<script type="text/javascript" src="<%=basePath%>/mallstyle/js/qq.js"
	charset="utf-8"></script>
<!--[if lte IE 6]>
<script type="text/javascript" language="Javascript" src="http://www.999000.cn/themes/mall/default/styles/default/<%=basePath%>/mallstyle/js/hoverForIE6.js"></script>
<![endif]-->
<script type="text/javascript">
			$(function() {
				$('#left h1 span,h2.title a.fold').click(function() {
					if($(this).hasClass('span_close')) {
						$(this).removeClass('span_close');
						$(this).addClass('span_open');
						this.title = 'open';
						closeSubmenu($(this).parent());
					} else {
						$(this).removeClass('span_open');
						$(this).addClass('span_close');
						this.title = 'close';
						openSubmenu($(this).parent());
					}
				});

				var span = $("#child_nav");
				span.hover(function() {
					$("#float_layer:not(:animated)").show();
				}, function() {
					$("#float_layer").hide();
				});

				// tyioocom
				$('.tsearch-tabs li').click(function() {
					$(this).parent().find('li').each(function() {
						$(this).attr('class', '');
					});
					$(this).attr('class', 'tsearch-tabs-active');
					$('.tsearch-panel input[name="act"]').val($(this).attr('ectype'));
				});
				$('.tsearch-panel #keyword').focus(function() {
					$('.tsearch-panel label').hide();
				}).blur(function() {
					if($(this).val() == '') {
						$('.tsearch-panel label').show();
					}
				});

			});

			function closeSubmenu(h1) {
				h1.next('ul').css('display', 'none');
			}

			function openSubmenu(h1) {
				h1.next('ul').css('display', '');
			}
		</script>
<script charset="utf-8" type="text/javascript"
	src="<%=basePath%>/mallstyle/js/jquery.validate.js"></script>
</head>
<style type="text/css">
#footer_links dl {
	width: 170px !important;
	margin-left: 15px;
	_margin-left: 0px;
}

#footer_links {
	width: 1000px !important;
	_width: 930px !important;
	padding: 20px 0px 15px 0px !important;
}

#footer #footer_links2 {
	width: 1000px !important;
	padding: 20px 0px 15px 0px;
}

#footer #footer_links2 dl {
	width: 95px !important;
}

#footer #footer_links2 dl.last {
	width: 130px !important;
}

.niu-xiaoshou {
	cursor: pointer;
}

.niu-rosy {
	width: 100px;
	height: 35px;
	border-radius: 5px;
	color: #fae7e9;
	border: solid 1px #b73948;
	background: #da5867;
	background: -webkit-gradient(linear, left top, left bottom, from(#f16c7c),
		to(#bf404f));
	background: -moz-linear-gradient(top, #f16c7c, #bf404f);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f16c7c',
		endColorstr='#bf404f');
}

.niu-rosy:hover {
	background: #ba4b58;
	background: -webkit-gradient(linear, left top, left bottom, from(#cf5d6a),
		to(#a53845));
	background: -moz-linear-gradient(top, #cf5d6a, #a53845);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cf5d6a',
		endColorstr='#a53845');
}

.niu-rosy:active {
	color: #dca4ab;
	background: -webkit-gradient(linear, left top, left bottom, from(#bf404f),
		to(#f16c7c));
	background: -moz-linear-gradient(top, #bf404f, #f16c7c);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#bf404f',
		endColorstr='#f16c7c');
}
</style>

<body>

	<div id="site-nav" class="w-full">
		<div class="shoptop w clearfix">
			<div class="login_info">
				hi, <a href="#"><span>${user.uName }</span></a> <a
					href="<%=path%>/rest/user/logout">退出</a> <a href="#">站内消息</a>
			</div>
			<ul class="quick-menu">
				<li class="home"><a href="../../index.jsp">回到首页</a></li>
				<li class="item">
					<div class="menu mytb">
						<a class="menu-hd" href="index.php?app=buyer_admin">我是买家<b></b></a>
						<div class="menu-bd">
							<div class="menu-bd-panel">
								<div>
									<p>
										<a href="#">已买到的宝贝</a>
									</p>
									<p>
										<a href="#">我的好友</a>
									</p>
									<p>
										<a href="#">我的咨询</a>
									</p>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li class="service"><a href="#">帮助中心</a></li>
			</ul>
		</div>
		<div class="fixed">
			<a id="gotop" href="javascript:window.scroll(0,0)" class="gotop"></a>
			<a href="javascript:;" class="feedbacklink"></a> <a
				href="javascript:;" class="zhaoping"></a>
		</div>
	</div>
	<div id="header">
		<div class="w clearfix"></div>
		<div class="w shopnav"></div>
	</div>
	<style>
.borline td {
	padding: 10px 0px;
}

.ware_list th {
	text-align: left;
}
</style>
	<script type="text/javascript">
			$(function() {
				$('#profile_form').validate({
					errorPlacement: function(error, element) {
						$(element).parent('span').parent('b').after(error);
					},
					rules: {
						portrait: {
							accept: 'gif|jpe?g|png'
						}
					},
					messages: {
						portrait: {
							accept: '支持gif、jpeg、jpg、png格式'
						}
					}
				});
				$('input[ectype="change_avatar"]').change(function() {

					var src = getFullPath($(this)[0]);
					$('img[ectype="avatar"]').attr('src', src);
					$('input[ectype="change_avatar"]').removeAttr('name');
					$(this).attr('name', 'portrait');
				});
			});
		</script>
	<div class="content">
		<div id="left">
			<dl class="menu">
				<dt class="first">
					<b></b><span>我的账户</span>
				</dt>
				<dd>
					<a href="<%=path%>/rest/user/myInfo" class="active"><span
						class="ico2">个人资料</span></a>
				</dd>
				<dd>
					<a href="<%=path%>/rest/address/getAllAddress" class="normal"><span
						class="ico7">我的地址</span></a>
				</dd>
			</dl>
		</div>
		<div id="right">
			<div class="location">
				<a href="../../index.jsp">首页</a> <a href="index.php?app=member">用户中心</a>
				基本信息
			</div>
			<div class="submenu">
				<ul class="tab">
					<li class="active first">
						<h2>
							<a href="javascript:;" onclick="niuJibenInfo()">基本信息</a>
						</h2>
					</li>
					<li class="active first">
						<h2>
							<a href="javascript:;" onclick="niuUpdataInfo()">修改信息</a>
						</h2>
					</li>
					<li class="active first">
						<h2>
							<a href="javascript:;" onclick="niuUpdataMiMa()">修改密码</a>
						</h2>
					</li>
				</ul>
			</div>
			<div class="wrap">
				<div class="public">
					<form method="post" enctype="multipart/form-data" id="niu-table1">
						<div class="information">
							<div class="info individual">
								<table>
									<tr>
										<th class="width4">用户名:</th>
										<td>${user.uName }</td>
									</tr>
									<tr>
										<th>真实姓名:</th>
										<td>${user.uRname }</td>
									</tr>
									<tr>
										<th>性别:</th>
										<td><c:if test="${user.uSex==0 }">男</c:if> <c:if
												test="${user.uSex==1 }">女</c:if></td>
									</tr>
									<tr>
										<th>电子邮箱:</th>
										<td>${user.uEmail }</td>
									</tr>
									<tr>
										<th>联系电话:</th>
										<td>${user.uTell }</td>
									</tr>
								</table>
							</div>
						</div>
					</form>
					<form method="post" action="<%=path%>/rest/user/editUser"
						enctype="multipart/form-data" id="niu-table3">
						<div class="information">
							<div class="info individual">
								<table>
									<tr>
										<th class="width4">用户名:</th>
										<td>${user.uName }</td>
									</tr>
									<tr>
										<th>真实姓名:</th>
										<td>${user.uRname }</td>
									</tr>
									<tr>
										<th>性别:</th>
										<td class="label"><label> <input type="radio"
												name="uSex" value="0" />男
										</label> <label> <input type="radio" name="uSex" value="1" />女
										</label></td>
									</tr>
									<tr>
										<th>电子邮箱:</th>
										<td><input type="text" class="text width_normal"
											name="uEmail" value="${user.uEmail }" /></td>
									</tr>
									<tr>
										<th>联系电话:</th>
										<td><input type="text" class="text width_normal"
											name="uTell" value="${user.uTell }" /></td>
									</tr>
									<tr>
										<th></th>
										<td><input type="submit" class="button niu-rosy"
											value="保存修改" /></td>
									</tr>
								</table>
							</div>
						</div>
						<input type="hidden" name="uId" value="${user.uId }" />
					</form>
					<form method="post" enctype="multipart/form-data" id="niu-table2">
						<div class="information">
							<div class="info individual">
								<table id="niu-table2">
									<tr>
										<th>旧密码:</th>
										<td><input type="text" class="text width_normal"
											name="uPassword1" value="" /></td>
									</tr>

									<tr>
										<th>新密码:</th>
										<td><input type="text" class="text width_normal"
											name="uPassword" value="" /></td>
									</tr>

									<tr>
										<th>确认密码:</th>
										<td><input type="text" class="text width_normal"
											name="confirmPassword" value="" /></td>
									</tr>
								</table>
								<div style="margin-left: 200px; margin-top: 10px;">
									<button class="button niu-rosy">确认修改</button>
								</div>
							</div>
						</div>
					</form>
				</div>
				<div class="wrap_bottom"></div>
			</div>

			<div class="clear"></div>
			<div class="adorn_right1"></div>
			<div class="adorn_right2"></div>
			<div class="adorn_right3"></div>
			<div class="adorn_right4"></div>
		</div>
		<div class="clear"></div>
	</div>
	<%@include file="../../../bottom.jsp"%>
	<script type="text/javascript">
			
			niuJibenInfo();
			function niuJibenInfo(){
				$("#niu-table1").show();
				$("#niu-table2").hide();
				$("#niu-table3").hide();
			}
			function niuUpdataInfo(){
				$("#niu-table3").show();
				$("#niu-table2").hide();
				$("#niu-table1").hide();
			}
			function niuUpdataMiMa(){
				$("#niu-table2").show();
				$("#niu-table1").hide();
				$("#niu-table3").hide();
			}
			
		</script>
</body>

</html>